<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <title><?= !empty($this->title) ? Html::encode($this->title) .' | ' : "" ?> <?=Yii::$app->system->title()?></title>
    <meta name="keywords" content="<?=Yii::$app->system->keywords()?>" />
    <meta name="description" content="<?=Yii::$app->system->description()?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <link rel="shorcut icon" href="http://www.cnexpo.com/favicon.ico">
    <?= Html::csrfMetaTags() ?>
    <?php $this->head() ?>
<!-- cnexpo.com Baidu tongji analytics -->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f85c226b1ed4f2b2d4aee9f14478463b";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
<?php $this->beginBody() ?>
<div id="wrap">
    <?=$this->render('header')?>
    <div class="main_content <?=Yii::$app->controller->id == 'member' ? 'ucenter':''?>">
        <div class="contBox f_relative"><div class="session_alert"><?= Alert::widget() ?></div></div>
        <?= $content ?>
    </div>
    <?php
    //判断是否会员中心
    if (Yii::$app->controller->id == 'member'){
    ?>
    <?=$this->render('footer-member')?>
    <?php
    }else{
    ?>
    <?=$this->render('footer')?>
    <?php
    }
    ?>
</div>
<div class="modal fade" id="formModal" tabindex="-1" role="dialog" aria-labelledby="formModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">Modal title</h4>
            </div>
            <div class="modal-body modal-body-view"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary">确认</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
